package com.lglbc.mybatispluslearning.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.lglbc.mybatispluslearning.entity.ManageUser;
import com.lglbc.mybatispluslearning.mapper.ManageUserMapper;
import com.lglbc.mybatispluslearning.service.IManageUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 乐哥聊编程
 * @since 2022-07-18
 */
@Service
public class ManageUserServiceImpl extends ServiceImpl<ManageUserMapper, ManageUser> implements IManageUserService {

    @Override
    @DS("")
    public ManageUser getFromMybatisPlusDB() {
        return baseMapper.selectOne(lambdaQuery().getWrapper());
    }

    @Override
    @DS("slave")
    public ManageUser getFromMybatisPlus2DB() {
        return baseMapper.selectOne(lambdaQuery().getWrapper());
    }
}
